package com.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.ArrayList;
import java.util.concurrent.*;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

@SpringBootApplication
public class FruitCleanApplication {

    public static void main(String[] args) {
        ArrayList<Integer> arr = new ArrayList<>();

        ArrayBlockingQueue<Integer> blockingQueue = new ArrayBlockingQueue<>(3);
        //blockingQueue.offer(15,2,TimeUnit.SECONDS)
        ReentrantLock lock = new ReentrantLock();
        Condition condition = lock.newCondition();
        new ThreadPoolExecutor(1, 1, 10, TimeUnit.SECONDS, new LinkedBlockingQueue<>(10), new RejectedExecutionHandler() {
            @Override
            public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {

            }
        });
        /*try {

        } catch (InterruptedException e) {
            e.printStackTrace();
        }*/
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        SpringApplication.run(FruitCleanApplication.class, args);
    }

}
